package santeclair.connexion.webservice.impl;

import javax.xml.rpc.ServiceException;

import org.springframework.remoting.jaxrpc.ServletEndpointSupport;

import santeclair.connexion.BeanWSTrame;
import santeclair.connexion.service.echanges.EchangesMma;
import santeclair.connexion.webservice.EchangeWebService;

/**
 * @author pveronneau
 */
public class EchangeWebServiceImpl extends ServletEndpointSupport implements EchangeWebService {

    private EchangesMma echangesMma;

    @Override
    protected void onInit() throws ServiceException {
        echangesMma = getWebApplicationContext().getBean(EchangesMma.class);
    }

    /** {@inheritDoc} */
    public BeanWSTrame echange(String alias, String trameAller, int service, String identifiantMetier, String application) {
        return echangesMma.echangeMma(alias, trameAller, service, identifiantMetier, application);
    }
}
